<div data-type="daily" data-zop-feedlist="">
{% for post in posts %}
<div class="explore-feed feed-item" data-offset="1" data-za-module="AnswerItem" data-za-index="">
<h2><a class="question_link" href="{{ url_for('.post', id=post.id) }}" target="_blank" data-id="17837366" data-za-element-name="Title">
{{ post.title }}

</a></h2>
<div tabindex="-1" class="zm-item-answer " itemscope="" itemtype="http://schema.org/Answer" data-aid="71319290" data-atoken="226868219" data-collapsed="0" data-created="1504795954" data-deleted="0" data-isowner="0" data-helpful="1" data-copyable="1" data-zop="">
<link itemprop="url" href="/question/64028409/answer/226868219">
<meta itemprop="answer-id" content="71319290">
<meta itemprop="answer-url-token" content="226868219">
<a class="zg-anchor-hidden" name="answer-71319290"></a>

<div class="zm-item-vote">
<a class="answer_vote_count_{{ post.id }}" href="javascript:;" data-bind-votecount=""></a>
</div>

<div class="zm-votebar" data-za-module="VoteBar">
<button class="up" aria-pressed="false" title="赞同">
<i class="icon vote-arrow"></i>
<span class="answer_vote_count_{{ post.id }}" href="javascript:;" data-bind-votecount=""></span>
<span class="label sr-only">赞同</span>
</button>
<button class="down" aria-pressed="false" title="反对，不会显示你的姓名">
<i class="icon vote-arrow"></i>
<span class="label sr-only">反对，不会显示你的姓名</span>
</button>
</div>

<div class="answer-head">

<div class="zm-item-answer-author-info">

<span class="summary-wrapper">

<span class="author-link-line">
<a class="author-link" data-hovercard="p$t$shannon_du" target="_blank" href="{{ url_for('main.user', id=post.author.id) }}">
{{ post.author.username }}
</a>
</span>

<span title="{{ post.author.about_me }}" class="bio">
{{ post.author.about_me }}
</span>
</span>
</div>

<div class="zm-item-vote-info" data-votecount="6519" data-za-module="VoteInfo">

<span class="voters text"><a href="#" class="more text"><span class="js-voteCount">6519</span>&nbsp;人赞同</a></span>

</div>
</div>
<div class="zm-item-rich-text expandable js-collapse-body" data-resourceid="17837366" data-action="/answer/content" data-author-name="Shannon" data-entry-url="/question/64028409/answer/226868219">

<!--<textarea hidden="" class="content">-->
<!--显示全部的时候里面的全部内容-->
<!--</textarea>-->

<div class="zh-summary summary clearfix">
{#
用下面的ajax getJSON 方法来配合api取到赞同最高的答案的内容和赞同数并且显示出来
#}
<a href="{{ url_for('.post', id=post.id) }}" class="{{ post.id }}"></a>

</div>
<script>

    $(document).ready(function(){
        $.getJSON("{{ url_for('api.get_ajax_post_answers', id=post.id) }}",function(result){
			$(".{{ post.id }}").append('<span class="themostpopularanswer">' + result["answers_body"] + '</span>');
			$(".answer_vote_count_{{ post.id }}").append(result["answer_vote"]);

		});
    })

</script>

<p class="visible-expanded"><a itemprop="url" class="answer-date-link meta-item" data-tooltip="s$t$发布于 2017-09-07" target="_blank" href="/question/64028409/answer/226868219">编辑于 2017-09-07</a></p>

</div>
<div class="zm-item-meta answer-actions clearfix js-contentActions">
<div class="zm-meta-panel">

<a data-follow="q:link" class="follow-link zg-follow meta-item" href="javascript:;" id="sfb-17837366"><i class="z-icon-follow"></i>关注问题</a>

<!--这个链接的地址是在文章的固定链接后面加上一个-->
<!--#comments 后缀。这个后缀称为 URL 片段，用于指定加载页面后滚动条所在的初始位置。-->
<!--Web 浏览器会寻找 id 等于 URL 片段的元素并滚动页面，让这个元素显示在窗口顶部。这-->
<!--个初始位置被设为 post.html 模板中评论区的标题，即 <h4 id="comments">Comments<h4> -->
<a href="{{ url_for('.post', id=post.id) }}#comments" name="addcomment" class="meta-item toggle-comment js-toggleCommentBox">

<!--注意链接文本中显示评论数量的方法。评论数量可以使用 SQLAlchemy 提供的 count() 过滤器轻易地从 posts 和 comments 表的一对多关系中获取-->
<i class="z-icon-comment"></i>{{ post.answers.count() }} 条评论</a>

<a href="#" class="meta-item zu-autohide js-thank" data-thanked="false"><i class="z-icon-thank"></i>感谢</a>

<a href="#" class="meta-item zu-autohide js-share goog-inline-block goog-menu-button" role="button" aria-expanded="false" tabindex="0" aria-haspopup="true" style="user-select: none;"><div class="goog-inline-block goog-menu-button-outer-box"><div class="goog-inline-block goog-menu-button-inner-box"><div class="goog-inline-block goog-menu-button-caption"><i class="z-icon-share"></i>分享</div><div class="goog-inline-block goog-menu-button-dropdown">&nbsp;</div></div></div></a>

<a href="#" class="meta-item zu-autohide js-collect"><i class="z-icon-collect"></i>收藏</a>

<span class="zg-bull zu-autohide">•</span>

<a href="#" class="meta-item zu-autohide js-noHelp">没有帮助</a>

<span class="zg-bull zu-autohide">•</span>
<a href="#" class="meta-item zu-autohide js-report">举报</a>

<meta name="copyrightStatus" content="1">
<meta name="disableCopyAvatar" content="">

<span class="zg-bull">•</span>

<a href="/terms#sec-licence-1" target="_blank" class="meta-item copyright">
{{ moment(post.timestamp).fromNow() }}
</a>

<button class="meta-item item-collapse js-collapse">
<i class="z-icon-fold"></i>收起
</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% if pagination %}
<div class="pagination">
    {{ macros.pagination_widget(pagination, '.index') }}
</div>
{% endif %}
</div>